import Vue from 'vue'
import App from './App'

import store from './store/index';
import config from './config.js';
import Tool from './common/js/tool.js';
import Api from './common/js/api.js';


Vue.$store = Vue.prototype.$store = store
Vue.$config = Vue.prototype.$config = config
Vue.$tool = Vue.prototype.$tool = Tool
Vue.$api = Vue.prototype.$api = Api
Vue.$toast = Vue.prototype.$toast = Tool.tipsFun.toast.default
Vue.$openWin = Vue.prototype.$openWin = Tool.webViewFun.default
Vue.$abyBack = Vue.prototype.$abyBack = Tool.webViewFun.back
// 注册全局组件
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
Vue.component('mescroll-body', MescrollBody)
Vue.component('mescroll-uni', MescrollUni)

Vue.prototype.$msg = (title, duration=1500, mask=false, icon='none')=>{
	//统一提示方便全局修改
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
}

// import api from './common/vmeitime-http/index.js'
// Vue.prototype.$api = api

// import appupgrade from './common/appupgrade.js'
// Vue.prototype.$appUpgrade = appupgrade

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
